package com.net.xpay.core.enums;


import com.net.common.enums.base.StringEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;

/**
 * 2020/4/28 15:41

 */
@Slf4j
@Getter
@AllArgsConstructor
public enum SafePayBookAccountSignStatus implements StringEnum<SafePayBookAccountSignStatus> {
    TEMP("TEMP", "暂存，协议未生效过"),
    NORMAL("NORMAL", "正常"),
    STOP("STOP", "暂停"),
    UNKNOWN("UNKNOWN", "未知");

    private String value;

    private String desc;

    public static SafePayBookAccountSignStatus of(String status) {
        try {
            return SafePayBookAccountSignStatus.valueOf(status);
        } catch (Exception e) {
            log.error("SafePayBookAccountSignStatus of error|status={}", status);
            return UNKNOWN;
        }
    }


}